<?php

namespace app\common\model\mycurrency;

use addons\mycurrency\library\Common;
use think\Model;
use traits\model\SoftDelete;

class Picture extends Model
{

    //use SoftDelete;


    // 表名
    protected $name = 'mycurrency_picture';


    const STATUS_XIANSHI = 1;//状态 显示
    const STATUS_YINCANG = 2;//状态 隐藏


    public function getImageAttr($value){
        $baseUrl = Common::GetHost();
        return $baseUrl . $value;
    }



    public function position()
    {
        return $this->belongsTo('PicturePosition', 'position_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
